package com.wwj.study.spring.formework.aop;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public class WAopConfig {

    private Map<Method,WAspect> aspectMap=new HashMap<Method,WAspect>();

    public void setAspectMap(Method method,Object aspect,Method [] methods){
        aspectMap.put(method,new WAspect(aspect,methods));
    }

    public Map<Method,WAspect> getAspectMap(){
        return aspectMap;
    }

    public class WAspect{
        public Object aspect;
        public Method [] methods;


        public WAspect(Object aspect, Method[] methods) {
            this.aspect = aspect;
            this.methods = methods;
        }

        public Object getAspect() {
            return aspect;
        }

        public void setAspect(Object aspect) {
            this.aspect = aspect;
        }

        public Method[] getMethods() {
            return methods;
        }

        public void setMethods(Method[] methods) {
            this.methods = methods;
        }
    }
}
